package com.thb.pay.engine.request.impl;

import com.thb.pay.engine.request.RuleActionRequest;
import com.thb.pay.engine.request.RuleCaseRequest;
import com.thb.pay.engine.request.RuleConditionRequest;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

/**
 * BaseRuleRequest
 *
 * <p>抽象类实现 一个case聚合执行多个动作+条件</p>
 *
 * @author lucky
 * @since 2019-11-08
 */
public abstract class BaseRuleCaseRequest<ID extends Serializable> extends BaseRuleNode<ID> implements RuleCaseRequest<ID> {

    protected RuleConditionRequest<ID> conditionRequest;

    protected List<RuleActionRequest<ID>> actionRequestList;

    public RuleConditionRequest<ID> getConditionRequest() {
        return conditionRequest;
    }

    public void setConditionRequest(RuleConditionRequest<ID> conditionRequest) {
        this.conditionRequest = conditionRequest;
    }

    public List<RuleActionRequest<ID>> getActionRequestList() {
        return actionRequestList;
    }

    public void setActionRequestList(List<RuleActionRequest<ID>> actionRequestList) {
        this.actionRequestList = actionRequestList;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SIMPLE_STYLE);
    }
}
